package com.dxx.cloud.admin.utils;

public class OrderUtils {
    /**
     * 生成订单编号
     * @return
     */
    public static String generateOrderNo(Long merId,Long shopId,Long orderId){
        //项目id+楼栋id+房源id+订单id
        return String.format("%d%02d%06d", merId,shopId, orderId);
    }

    /**
     * 生成库存变更编号
     * @return
     */
    public static String generateInventoryChangeNo(int merId,int shopId,Integer userId,Integer index){
        if(null == userId){
            userId = 0;
        }
        //项目id+楼栋id+房源id+订单id
        return String.format("%d%02d%02d%06d", merId,shopId,userId, index);
    }
}
